/**
 * ATuanZhang
 */
package org.huanglei.android.activity;

import org.huanglei.android.application.AndroidApplication;
import org.huanglei.android.inject.provider.InjectorProvider;

import android.app.ListActivity;
import android.os.Bundle;

import com.google.inject.Injector;

/**
 * @author huanglei
 * @date 2011-3-24 @
 */
public class BaseListActivity extends ListActivity implements InjectorProvider {

	protected final String TAG = this.getClass().getName();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		final Injector injector = getInjector();
		injector.injectMembers(this);
		super.onCreate(savedInstanceState);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.huanglei.android.inject.provider.InjectorProvider#getInjector()
	 */
	@Override
	public Injector getInjector() {
		return ((AndroidApplication) getApplication()).getInjector();
	}

}
